package com.dudy.spring1;

import org.springframework.context.ApplicationEvent;

/**
 * @author <a href="mailto:wb-zhaojunwei@alibaba-inc.com">wb-zhaojunwei</a>
 * @version 1.0
 * @Description spring的事件处理机制也是一种观察者模式，该类是观察者模式中的主体
 * @Since 2016/5/25
 */
public class SpringSubject extends ApplicationEvent {
    private String address;
    private String text;
    public SpringSubject(Object source) {
        super(source);
    }

    public SpringSubject(Object source, String address, String text) {
        super(source);
        this.address = address;
        this.text = text;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
